using System;
using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity;
using System.Linq;

namespace WFTest.Entity
{
    public partial class Model3 : DbContext
    {
        public Model3()
            : base("name=Model3")
        {
        }

        public virtual DbSet<cost_sheet> cost_sheet { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.onumber)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.doc_number)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.product)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.dept)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.period)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.doc_type)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.pi)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.code)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.pr_name)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.spec)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.unit)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.un_material)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.un_people)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.un_manu)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.un_cost)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.co_material)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.co_people)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.co_labor)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.co_manu)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.co_amount)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.source)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.price)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.output)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.income)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.profit)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.pmargin)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.gross_profit)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.gmargin)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.oper)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.omargin)
                .HasPrecision(38, 2);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.id)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.sales)
                .IsUnicode(false);

            modelBuilder.Entity<cost_sheet>()
                .Property(e => e.cost_name)
                .IsUnicode(false);
        }
    }
}
